Skip to content

🎨 Add fallback traefik 503 routes 🚨⚠️ DEVOPS #7899

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

YuryHrytsuk
Copy link
Contributor

@YuryHrytsuk YuryHrytsuk commented Jun 13, 2025

What do these changes do?

Add fallback routes that will take effect once main services (e.g. webserver is not in running state). This fallback routes will trigger 503 traefik default response which is a proper response when simcore service is not in running state.

By default traefik removes configuration of services that are not in running state (this leads to 404) traefik/traefik#7842

image

Next steps

Ship relevant html / json content back to users. We need to discuss what is proper content and in which scenarios we need to serve it.

Implementation details

https://doc.traefik.io/traefik/providers/swarm/#allowemptyservices traefik configuration setting was tested but had no effect as reported in traefik/traefik#11827

We don't have traefik healthcheck for simcore traefik. Since we need to introduce healthcheck per traefik-service and simcore traefik defines multiple of those, introducing extra 3 calls on traefik service might be an overkill. It is not clear is this healthcheck makes sense in general as it runs against traefik itself 🤷

Related issue/s

Related PR(s)

How to test

Scale exposed simcore service (e.g. webserver to 0 replicas). Open platform in browser and ensure you get 503 error with Unavailable service message (instead of 404 not found)

Dev-ops

  • No changes ENV

Add fallback routes that will take effect once main services (e.g.
webserver is not in `running` state). Once service is not in `running`
state, its configuration is removed from traefik leading to 404.

Related Issue(s):
* ITISFoundation/osparc-ops-environments#218

Related PR(s):
* ITISFoundation/osparc-ops-environments#950
@YuryHrytsuk YuryHrytsuk added this to the Engage milestone Jun 13, 2025
@YuryHrytsuk YuryHrytsuk self-assigned this Jun 13, 2025
Copy link

codecov bot commented Jun 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.98%. Comparing base (5d5eac3) to head (f05ecca).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7899      +/-   ##
==========================================
+ Coverage   87.94%   87.98%   +0.03%     
==========================================
  Files        1845     1838       -7     
  Lines       71130    70940     -190     
  Branches     1220     1220              
==========================================
- Hits        62558    62419     -139     
+ Misses       8220     8168      -52     
- Partials      352      353       +1     
Flag Coverage Δ
integrationtests 64.24% <ø> (+0.03%) ⬆️
unittests 86.57% <ø> (+0.03%) ⬆️
Components Coverage Δ
api ∅ <ø> (∅)
pkg_aws_library 93.92% <ø> (ø)
pkg_dask_task_models_library 79.62% <ø> (ø)
pkg_models_library 93.25% <ø> (ø)
pkg_notifications_library 85.26% <ø> (ø)
pkg_postgres_database 88.18% <ø> (ø)
pkg_service_integration 69.92% <ø> (ø)
pkg_service_library 72.59% <ø> (ø)
pkg_settings_library 90.90% <ø> (ø)
pkg_simcore_sdk 84.93% <ø> (-0.12%) ⬇️
agent 96.29% <ø> (ø)
api_server 91.85% <ø> (ø)
autoscaling 96.03% <ø> (ø)
catalog 92.29% <ø> (ø)
clusters_keeper 99.13% <ø> (ø)
dask_sidecar 91.57% <ø> (-0.23%) ⬇️
datcore_adapter 97.94% <ø> (ø)
director 76.73% <ø> (ø)
director_v2 91.18% <ø> (+0.04%) ⬆️
dynamic_scheduler 96.69% <ø> (ø)
dynamic_sidecar 90.09% <ø> (ø)
efs_guardian 89.65% <ø> (ø)
invitations 93.00% <ø> (ø)
payments 92.57% <ø> (ø)
resource_usage_tracker 88.98% <ø> (-0.22%) ⬇️
storage 87.71% <ø> (+0.24%) ⬆️
webclient ∅ <ø> (∅)
webserver 87.51% <ø> (+0.02%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5d5eac3...f05ecca. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@sanderegg sanderegg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@YuryHrytsuk YuryHrytsuk added the 🤖-automerge marks PR as ready to be merged for Mergify label Jun 16, 2025
@YuryHrytsuk
Copy link
Contributor Author

@Mergifyio queue

Copy link
Contributor

mergify bot commented Jun 16, 2025

queue

🟠 Waiting for conditions to match

  • any of: [🔀 queue conditions]
    • all of: [📌 queue conditions of queue default]
      • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
      • #review-threads-unresolved=0
      • any of: [🛡 GitHub branch protection]
        • check-neutral = system-tests
        • check-skipped = system-tests
        • check-success = system-tests
      • any of: [🛡 GitHub branch protection]
        • check-neutral = unit-tests
        • check-skipped = unit-tests
        • check-success = unit-tests
      • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
      • #approved-reviews-by>=2
      • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
      • #changes-requested-reviews-by=0
      • -conflict
      • -draft
      • base=master
      • branch-protection-review-decision = APPROVED [🛡 GitHub branch protection]
      • label!=🤖-do-not-merge
      • label=🤖-automerge
      • any of: [🛡 GitHub branch protection]
        • check-skipped = deploy to dockerhub
        • check-neutral = deploy to dockerhub
        • check-success = deploy to dockerhub
      • any of: [🛡 GitHub branch protection]
        • check-success = check OAS' are up to date
        • check-neutral = check OAS' are up to date
        • check-skipped = check OAS' are up to date
      • any of: [🛡 GitHub branch protection]
        • check-success = integration-tests
        • check-neutral = integration-tests
        • check-skipped = integration-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = build-test-images (frontend) / build-test-images
        • check-neutral = build-test-images (frontend) / build-test-images
        • check-skipped = build-test-images (frontend) / build-test-images
  • -closed [📌 queue requirement]
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of: [📌 queue -> configuration change requirements]
    • -mergify-configuration-changed
    • check-success = Configuration changed

@YuryHrytsuk YuryHrytsuk added 🤖-do-not-merge (optional) blocks Mergify from merging the PR and removed 🤖-automerge marks PR as ready to be merged for Mergify labels Jun 16, 2025
Copy link
Member

@mrnicegyu11 mrnicegyu11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 🪨

comment see parent PR ITISFoundation/osparc-ops-environments#950 (review)

@YuryHrytsuk YuryHrytsuk added 🤖-automerge marks PR as ready to be merged for Mergify and removed 🤖-do-not-merge (optional) blocks Mergify from merging the PR labels Jun 16, 2025
@YuryHrytsuk
Copy link
Contributor Author

@Mergifyio queue

Copy link
Contributor

mergify bot commented Jun 16, 2025

queue

🟠 Waiting for conditions to match

  • any of: [🔀 queue conditions]
    • all of: [📌 queue conditions of queue default]
      • label!=🤖-do-not-merge
      • label=🤖-automerge
      • any of: [🛡 GitHub branch protection]
        • check-neutral = system-tests
        • check-skipped = system-tests
        • check-success = system-tests
      • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
      • #approved-reviews-by>=2
      • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
      • #changes-requested-reviews-by=0
      • #review-threads-unresolved = 0 [🛡 GitHub branch protection]
      • #review-threads-unresolved=0
      • -conflict
      • -draft
      • base=master
      • branch-protection-review-decision = APPROVED [🛡 GitHub branch protection]
      • any of: [🛡 GitHub branch protection]
        • check-skipped = deploy to dockerhub
        • check-neutral = deploy to dockerhub
        • check-success = deploy to dockerhub
      • any of: [🛡 GitHub branch protection]
        • check-success = unit-tests
        • check-neutral = unit-tests
        • check-skipped = unit-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = check OAS' are up to date
        • check-neutral = check OAS' are up to date
        • check-skipped = check OAS' are up to date
      • any of: [🛡 GitHub branch protection]
        • check-success = integration-tests
        • check-neutral = integration-tests
        • check-skipped = integration-tests
      • any of: [🛡 GitHub branch protection]
        • check-success = build-test-images (frontend) / build-test-images
        • check-neutral = build-test-images (frontend) / build-test-images
        • check-skipped = build-test-images (frontend) / build-test-images
  • -closed [📌 queue requirement]
  • -conflict [📌 queue requirement]
  • -draft [📌 queue requirement]
  • any of: [📌 queue -> configuration change requirements]
    • -mergify-configuration-changed
    • check-success = Configuration changed

Copy link

@YuryHrytsuk YuryHrytsuk removed the 🤖-automerge marks PR as ready to be merged for Mergify label Jun 16, 2025
@YuryHrytsuk
Copy link
Contributor Author

YuryHrytsuk commented Jun 16, 2025

Do not merge before

Release v1.83.0

@YuryHrytsuk YuryHrytsuk requested a review from pcrespov June 16, 2025 13:52
@YuryHrytsuk YuryHrytsuk added the 🤖-do-not-merge (optional) blocks Mergify from merging the PR label Jun 16, 2025
Copy link
Member

@pcrespov pcrespov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖-do-not-merge (optional) blocks Mergify from merging the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants